package com.zp.collection;

import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.Set;

public class HashMapTest3 {
	public static void main(String[] args) {
		
		HashMap<String,String> map = new HashMap<String,String>();
		
		map.put("a","Avalue");
		map.put("b","Bvalue");
		map.put("c","Cvalue");
		
		Set<Map.Entry<String,String>> set = map.entrySet();
		
		for(Iterator<Map.Entry<String,String>> iter = set.iterator();iter.hasNext();){
			Map.Entry<String,String> entry = iter.next();
			String key = entry.getKey();
			String value = entry.getValue();
			System.out.println("key="+key+"; "+"value="+value);
		}
	}
}
